package com.lebang.feign.bus;

import com.lebang.feign.bus.fallback.MemberBussSiteRecordFallback;
import com.lebang.model.RequestUserInfo;
import com.lebangweb.response.JsonData;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * @author ljx
 */
@FeignClient(name = "wangzhuan-bus", contextId = "wangzhuan-bus-siterecord", fallback = MemberBussSiteRecordFallback.class)
public interface MemberBussSiteRecordFeign {

    @ApiOperation("添加附近站点记录")
    @PostMapping("/buss/siterecord/add")
    JsonData add(@RequestBody RequestUserInfo request,
                        @ApiParam(name = "位置") @RequestParam("site") String site,
                        @ApiParam(name = "信息") @RequestParam("message") String message,
                        @ApiParam(name = "类型") @RequestParam("type") Integer type,
                        @ApiParam(name = "标识") @RequestParam("poiId") String poiId,
                        @ApiParam(name = "城市id") @RequestParam(value = "cityId") String cityId);

    @ApiOperation("删除附近站点记录")
    @PostMapping("/buss/siterecord/delone")
    JsonData delOne(@RequestBody RequestUserInfo request,@ApiParam(name = "标识") @RequestParam("poiId") String poiId,@ApiParam(name = "城市id") @RequestParam(value = "cityId") String cityId);
}
